<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <my-alert>
      <template #title>我是标题</template>
      <template #content>我是内容</template>
    </my-alert>
  </div>
  <script src="js/vue.js"></script>
  <script>
    Vue.component('my-alert', {
      template: `
            <div>
              <slot name="title"></slot>
              <slot name="content"></slot>
            </div>
          `
    })
    var vm = new Vue({
      el: '#app',
      data: {},
      methods: {}
    });
  </script>
</body>

</html>